Skip to content

refactor(docs): move REST API docs to navbar and dedicated sidebar#3040

Merged
fallenbagel merged 2 commits into
developfrom
docs/move-api-docs
May 16, 2026
Merged

refactor(docs): move REST API docs to navbar and dedicated sidebar#3040
fallenbagel merged 2 commits into
developfrom
docs/move-api-docs

Conversation

@fallenbagel
Copy link
Copy Markdown
Collaborator

@fallenbagel fallenbagel commented May 16, 2026

Description

The REST API documentation was mixed into the main documentation sidebar
alongside user-facing docs like Getting Started, Using Seerr, and
Extending Seerr. While collapsed by default, it's a developer-oriented
section that doesn't belong in the same navigation as user guides, and
the separation makes the intent of each section clearer.

This moves the REST API docs to a dedicated navbar entry and footer
link, keeping it easily accessible for developers while leaving the main
sidebar clean for users. The API pages retain their own sidebar with the
full endpoint tree when navigating to /api/*.

Also removes the redundant all argument passed to pnpm gen-api-docs in both the test and deploy workflows. The gen-api-docs script in gen-docs/package.json already includes all, so passing it again resulted in docusaurus gen-api-docs all all.
image

How Has This Been Tested?

Locally built and ran

Screenshots / Logs (if applicable)

image image image

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Summary by CodeRabbit

  • Documentation
    • Added a "REST API" link to the top navigation bar for easier access to API docs.
    • Added a "REST API" link in the footer under Docs.
    • Reorganized the API documentation sidebar for clearer structure and discoverability.
    • Documentation build now includes a step to generate up-to-date API docs before publishing.

Review Change Stack

@fallenbagel fallenbagel requested a review from a team as a code owner May 16, 2026 07:30
@fallenbagel fallenbagel added the documentation Improvements or additions to documentation label May 16, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

📝 Walkthrough

Walkthrough

Restructures REST API documentation navigation by importing a dedicated API sidebar, filtering out auto-generated API categories from the main sidebar, adding explicit REST API navbar/footer links, and running API doc generation before the docs build steps.

Changes

REST API Documentation Navigation Restructuring

Layer / File(s) Summary
API sidebar import and sidebarItemsGenerator
gen-docs/sidebars.ts, gen-docs/docusaurus.config.ts
Imports apiSidebar from ../docs/api/sidebar, wires apisidebar into exported sidebars, and adds an async sidebarItemsGenerator that removes category sidebar items whose label lowercased equals api.
REST API navbar and footer links
gen-docs/docusaurus.config.ts
Adds a right-aligned navbar item { to: '/api/seerr-api', label: 'REST API' } and a footer Docs link { label: 'REST API', to: '/api/seerr-api' }.
Docs build workflow changes
.github/workflows/test-docs.yml, .github/workflows/docs-deploy.yml
Updates docs CI steps to run pnpm gen-api-docs (without the previous all argument) immediately before pnpm build so API docs are generated prior to the site build.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • seerr-team/seerr#3027: Related to coordinating gen-api-docs generation in the docs build workflow and scripts.
  • seerr-team/seerr#2981: Related adjustments to REST API docs and _category_.json configuration; this PR continues integration and navigation changes.

Suggested reviewers

  • 0xSysR3ll
  • gauthier-th
  • M0NsTeRRR

Poem

🐰 I hopped through configs, tidy and spry,
I nudged the API sidebar awry,
A navbar sign for REST gleams bright,
Footer follows suit, a tidy sight,
Docs build now fetches the API first—hip hop, delight! ✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: moving REST API documentation from the main sidebar to a dedicated navbar entry and sidebar.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gen-docs/sidebars.ts`:
- Line 18: The manual registration of the API sidebar (the apisidebar property
referencing apiSidebar) is redundant when the OpenAPI plugin auto-registers
sidebars; remove the apisidebar: apiSidebar entry from the exported sidebars
object and instead configure the plugin's sidebarOptions (or the plugin-specific
sidebar ID) to use the imported apiSidebar if the plugin requires it—verify the
OpenAPI plugin docs and adjust the plugin's sidebarOptions or the exported
sidebar ID accordingly so the build no longer registers the sidebar twice.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 82b0e126-1594-4373-a35d-607452d49df8

📥 Commits

Reviewing files that changed from the base of the PR and between df105b8 and f10e70f.

📒 Files selected for processing (3)
  • docs/api/_category_.json
  • gen-docs/docusaurus.config.ts
  • gen-docs/sidebars.ts
💤 Files with no reviewable changes (1)
  • docs/api/category.json

Comment thread gen-docs/sidebars.ts
Remove the _category_.json that was injecting the API docs into theautogenerated documentation
sidebar, add a sidebarItemsGenerator toexplicitly exclude the api/ directory from the main sidebar,
registerapisidebar as a top-level sidebar so API pages retain their ownnavigation, and add REST API
links to the navbar and footer.
@fallenbagel fallenbagel force-pushed the docs/move-api-docs branch from f10e70f to 6d1235f Compare May 16, 2026 07:36
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/test-docs.yml (1)

59-62: ⚡ Quick win

Consider splitting API docs generation into a separate step.

While the current implementation works correctly, splitting the API docs generation into its own step would improve visibility in the GitHub Actions UI and make debugging easier if either step fails.

♻️ Proposed refactor to separate the steps
-      - name: Build website
+      - name: Generate API documentation
         run: |
           cd gen-docs
-          pnpm gen-api-docs all && pnpm build
+          pnpm gen-api-docs all
+
+      - name: Build website
+        run: |
+          cd gen-docs
+          pnpm build
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test-docs.yml around lines 59 - 62, The current "Build
website" step bundles API docs generation and the site build into one command,
making failures hard to diagnose; split it into two GitHub Actions steps by
replacing the single step that runs "cd gen-docs && pnpm gen-api-docs all &&
pnpm build" with (1) a "Generate API docs" step that runs "cd gen-docs && pnpm
gen-api-docs all" and (2) a separate "Build website" step that runs "cd gen-docs
&& pnpm build", so the commands pnpm gen-api-docs and pnpm build are executed
and logged independently for clearer visibility and debugging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/test-docs.yml:
- Line 62: Remove the redundant "all" argument in the workflow command so it
doesn't pass "all" twice to docusaurus: update the step that runs "pnpm
gen-api-docs all && pnpm build" to call only the package script (i.e., run "pnpm
gen-api-docs && pnpm build"), since the gen-docs package.json already defines
the "gen-api-docs" script as "docusaurus gen-api-docs all"; change the command
in the workflow to invoke the script without the extra "all".

---

Nitpick comments:
In @.github/workflows/test-docs.yml:
- Around line 59-62: The current "Build website" step bundles API docs
generation and the site build into one command, making failures hard to
diagnose; split it into two GitHub Actions steps by replacing the single step
that runs "cd gen-docs && pnpm gen-api-docs all && pnpm build" with (1) a
"Generate API docs" step that runs "cd gen-docs && pnpm gen-api-docs all" and
(2) a separate "Build website" step that runs "cd gen-docs && pnpm build", so
the commands pnpm gen-api-docs and pnpm build are executed and logged
independently for clearer visibility and debugging.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9834e23d-afd3-4f7f-9261-177415915b05

📥 Commits

Reviewing files that changed from the base of the PR and between f10e70f and 6d1235f.

📒 Files selected for processing (4)
  • .github/workflows/test-docs.yml
  • docs/api/_category_.json
  • gen-docs/docusaurus.config.ts
  • gen-docs/sidebars.ts
💤 Files with no reviewable changes (1)
  • docs/api/category.json
✅ Files skipped from review due to trivial changes (1)
  • gen-docs/sidebars.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • gen-docs/docusaurus.config.ts

Comment thread .github/workflows/test-docs.yml Outdated
@seerr-automation-bot seerr-automation-bot added this to the v3.3.0 milestone May 16, 2026
@fallenbagel fallenbagel enabled auto-merge (squash) May 16, 2026 10:06
@fallenbagel fallenbagel merged commit 08b7bd4 into develop May 16, 2026
21 checks passed
@fallenbagel fallenbagel deleted the docs/move-api-docs branch May 16, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants